home *** CD-ROM | disk | FTP | other *** search
- Path: gallant.apple.com!murky.apple.com!decwrl!purdue!mozo.cc.purdue.edu!garage.
- ecn.purdue.edu!parrt
- From: parrt@garage.ecn.purdue.edu (Terence J Parr)
- Newsgroups: comp.compilers.tools.pccts
- Subject: Re: PCCTS 1.30b6 is at the ftp site
- Date: 12 Nov 1994 19:01:49 GMT
- Organization: Purdue University Engineering Computer Network
- Lines: 26
- Message-ID: <3a33et$t6l@mozo.cc.purdue.edu>
- References: <39bg5p$na@nntpd.lkg.dec.com> <1994Nov11.180204.23775@worldbank.org>
- NNTP-Posting-Host: garage.ecn.purdue.edu
-
- Tony,
-
- What you want is easy to do:
-
- a : PARSE THIS
- <<
- DLGStringInput in(your string buf);
- DLGLexer scan(&in);
- ANTLRTokenBuffer pipe(&scan);
- ANTLRToken atoken;
- scan.setToken(&atoken);
- NewParser parser;
- parser.init();
- parser.start_symbol();
- >>
- CONTINUE PARSING
- ;
-
- The parser will automatically continue where it left off before
- invoking the new parser.
-
- This is how to handling include files etc... in C++ mode.
- Don't save the state, just "fork" a new parser!
-
- Regards,
- Terence of the North
- ---------------------------------------------------------------------------
-